﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FSMtoCode.Types;

namespace FSMtoCode
{
    class AST
    {
        private List<FSMStateTerm> lstStatesTerm = new List<FSMStateTerm>(2);
        private List<FSMState> lstStates = new List<FSMState>();
        private List<FSMTransition> lstTransitions = new List<FSMTransition>();        

        public AST(){}

        public List<FSMTransition> getlstTransitions
        {
            get { return lstTransitions; }
            set { lstTransitions = value; }
        }

        public List<FSMState> getlstStates
        {
            get { return lstStates; }
            set { lstStates = value; }
        }

        public List<FSMStateTerm> getlstStatesTerm
        {
            get { return lstStatesTerm; }
            set { lstStatesTerm = value; }
        }

        public void SaveStateTerm(FSMStateTerm stateTerm)
        {             
             lstStatesTerm.Add(stateTerm);
        }

        public void SaveState(FSMState state)
        {
            lstStates.Add(state); 
        }

        public void SaveTransition(FSMTransition transition)
        {
            lstTransitions.Add(transition);        
        }
    }
}
